package com.woniuxy02;

import java.util.Scanner;

/**
 * @author 作者
 * @create 2025-09-05 15:43
 */
public class Test01 {
    public static void main(String[] args) {
//        Car car=new Benz();
//        car.run();
//        car=new Bmw();
//        car.run();
        Scanner sc = new Scanner(System.in);
        System.out.println("你要什么车:benz/bwm/...");
        String type = sc.next();
        Car car = CarFactory.createCar(type);
        if (car!=null) {
            car.run();
        }
    }
}
